{% extends '::base.html.twig' %}
{% block title %}Edición de temas{% endblock %}

{% block greensectiontitle %}Editar tema{% endblock %}

{% block body %}

<h2>Registre los temas</h2>

<form id = 'editForm'action="{{ path('tema_update', { 'id': entity.id }) }}" method="post" {{ form_enctype(edit_form) }}>
    {{ form_widget(edit_form) }}
        
  {% macro prototype(tema) %}
    <tr>
        <td class="center">{{ form_widget(tema.nombre) }}</td>
        <td><div id="controls" style="text-align: center;"><a href="#">Quitar</a></div></td>
    </tr> 
   {% endmacro %}  
    
    
    
   <div id="records_table">
        
    <table id="temas-table" padding="0" margin="0">
        <thead>
            <tr>
                <th colspan="2">
                    <div id="controls">
                        Temas
                        <a href="#" id="add-tema" style="float:right;">Agregar</a>
                    </div>
                </th>
            </tr>
            <tr>
                <th>Nombre</th>
                <th>Acciones</th>
            </tr>
        </thead>
        
   
    
   </table>
  </div>     
        
    <div id="controls">
        <a id="saveButton" href="#">Guardar</a>
        <a href="{{ path('tema') }}">Cancelar</a>
    </div>
</form>

<ul class="record_actions">
    
    <li>
        <form action="{{ path('tema_delete', { 'id': entity.id }) }}" method="post">
            {{ form_widget(delete_form) }}
            <button type="submit">Quitar</button>
        </form>
    </li>
</ul>
{% endblock %}